home *** CD-ROM | disk | FTP | other *** search
- /*
- * $VER: scmsg.ged 1.0 (19.07.94)
- * ©1994 Markus Zahn (Zahn@Uni-Augsburg.DE)
- * Retrieve next error/warning message using SAS/C 6.50
- *
- * Notes:
- *
- * Your env:sc/SCMSG file should contain lines that look something
- * like the following to work with GoldED:
- *
- * PORTNAME GOLDED.1
- * EDITCOMMAND GED "%f"
- * GOTOFILE WINDOW USE="%f" FORCE
- * GOTOLINE GOTO LINE %l UNFOLD=TRUE
- * PUBSCREEN GOLDED.1
- *
- * Your env:sc/SCOPTIONS file should contain the following line:
- *
- * ERRORREXX
- */
-
- OPTIONS RESULTS /* enable return codes */
-
- if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
- address 'GOLDED.1'
-
- 'LOCK CURRENT' /* lock GUI, gain access */
- OPTIONS FAILAT 21 /* ignore warnings */
- SIGNAL ON SYNTAX /* ensure clean exit */
-
-
- /* ------------------------ INSERT YOUR CODE HERE: ------------------- */
-
- 'QUERY CAT'
- isGerman = ( result = "deutsch" )
-
- if( ~show( ports, SC_SCMSG ) ) then
- do
- address command 'run <nil: >nil: sc:c/scmsg'
- address command 'waitforport SC_SCMSG'
- end
-
- address SC_SCMSG 'file'
- file = result
- if( result = '' ) then
- do
- if( isGerman ) then
- 'REQUEST BODY="Keine (weiteren) errors/warnings!"'
- else
- 'REQUEST BODY="No (more) errors/warnings!"'
- end
- else
- do
- address SC_SCMSG 'line'
- line = result
- address SC_SCMSG 'class'
- class = result
- address SC_SCMSG 'text'
- message = class || ': ' || result
- address SC_SCMSG 'altfile'
- altfile = result
-
- 'FIX VAR MESSAGE'
-
- if( altfile ~= '' ) then
- do
- address SC_SCMSG 'altline'
- altline = result
-
- 'WINDOW USE="' || altfile || '" FORCE'
- 'GOTO LINE=' || altline || ' UNFOLD=TRUE'
- 'REQUEST STATUS="' || message || '"'
- end
-
- 'WINDOW USE="' || file || '" FORCE'
- 'GOTO LINE=' || line || ' UNFOLD=TRUE'
- 'REQUEST STATUS="' || message || '"'
-
- address SC_SCMSG 'delete'
- end
-
- /* ---------------------------- END OF YOUR CODE --------------------- */
-
- 'UNLOCK' /* VERY important: unlock GUI */
- EXIT
-
- SYNTAX:
-
- SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
- 'UNLOCK'
- EXIT
-